//package com.yupi.springbootinit.bimq;
//
//import com.rabbitmq.client.Channel;
//import lombok.SneakyThrows;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.amqp.support.AmqpHeaders;
//import org.springframework.messaging.handler.annotation.Header;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//public class MyMessageConsumer {
//
//    @SneakyThrows
//    @RabbitListener(queues = {"test_queue"}, ackMode = "MANUAL")
//    public void receiveMessage(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTage){
//        log.info("已消费 tag ：" + deliveryTage + ", 的消息，消息内容为" + message);
//        channel.basicAck(deliveryTage, false);
//    }
//}
